The FRACTAL component model and its support in Java

نویسندگان

  • Eric Bruneton
  • Thierry Coupaye
  • Matthieu Leclercq
  • Vivien Quéma
  • Jean-Bernard Stefani
چکیده

class M implements I { abstract void _super_m (); abstract void _this_n (); public int count; public void m () { ++count; ‡This is no longer true with version 1.1 of AspectJ, but this was the case in 2002 when JULIA was developed. Copyright c © 2006 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2006; 36:1257–1284 DOI: 10.1002/spe THE FRACTAL COMPONENT MODEL AND ITS SUPPORT IN JAVA 1267 _this_n(); _super_m(); } } Mixin classes can be mixed, resulting in normal classes. More precisely, the result of mixing several mixin classes M1, . . . , Mn, in this order, is a normal class that is equivalent to a class Mn extending the Mn−1 class, itself extending the Mn−2 class, . . . itself extending the M1 class (constructors are ignored; an empty public constructor is generated for the mixed classes). Several mixin classes can be mixed only if each method and field required by a mixin class Mi is provided by a mixin class Mj , with j < i (each required method and field may be provided by a different mixin). For example, if N and O designate the following mixins: abstract class N implements I { abstract class O implements I { abstract void _super_m (); public void m () { System.out.println("m"); public void m () { } System.out.println("m called"); public void n () { _super_m(); System.out.println("n"); } } } }class N implements I { abstract class O implements I { abstract void _super_m (); public void m () { System.out.println("m"); public void m () { } System.out.println("m called"); public void n () { _super_m(); System.out.println("n"); } } } } then the mixed class O N M is equivalent to the following class (note that this class implements all of the interfaces implemented by the mixin classes): public class C55d992cb_0 implements I, Generated { // from O private void m$1 () { System.out.println("m"); } public void n () { System.out.println("n"); } // from N private void m$0 () { System.out.println("m called"); m$1(); } // from M public int count; public void m () { ++count; n(); m$0(); } } Copyright c © 2006 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2006; 36:1257–1284 DOI: 10.1002/spe 1268 E. BRUNETON ET AL. The mixed classes are generated dynamically, directly in bytecode form with ASM [10], by the MixinClassGenerator class. In order to ease debugging, the class generator keeps the line numbers of the mixin classes in the mixed class. More precisely, a line number l of the mixin class at index i (in the list of mixin classes, and starting from 1) is transformed into 1000 ∗ i + l. For example, if a new Exception().printStackTrace() were added in the N.m method, the stack trace would contain a line at C55d992cb 0.m$0(ONM:2005), meaning that the exception was created in method m$0 of the C55d992cb 0 class, whose source is the ONM mixed class, at line 5 of mixin 2, i.e. at line 5 of the N mixin class.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Application of fractal modeling and PCA method for hydrothermal alteration mapping in the Saveh area (Central Iran) based on ASTER multispectral data

The aim of this study is determination and separation of alteration zones using Concentration-Area (C-A) fractal model based on remote sensing data which has been extracted from Advanced Spaceborne Thermal Emission and Reflection Radiometer (ASTER) images. The studied area is on the SW part of Saveh, 1:250,000 geological map, which is located in Urumieh-Dokhtar magmatic belt, Central Iran. The ...

متن کامل

A model for modified electrode with carbon nanotube composites using percolation theory in fractal space

We introduce a model for prediction the behavior of electrodes which modified withcarbon nanotubes in a polymer medium. These kinds of polymer composites aredeveloped in recent years, and experimental data for its percolation threshold isavailable. We construct a model based on percolation theory and fractal dimensionsand using experimental percolation threshold for calculating the moments of c...

متن کامل

Behavioural Verification of Distributed Components

Component models provide a structured programming paradigm, and ensure a very good re-usability of programs. Indeed in component applications, dependencies are defined together with provided functionalities by the means of provided/required ports; this improves the program re-usability. Some component models and their implementations additionally keep a trace at runtime of the component structu...

متن کامل

Component Reliability Extensions for Fractal component model

Fractal is a component model developed initially by France Telecom and INRIA and later as an open source project in the ObjectWeb consortium. The component model is defined by the Fractal Component Model specification [BCS]. The specification defines a hierarchical component model, where a component is specified in terms of its server and client (provided and required) interfaces and configurab...

متن کامل

CoCoME in Fractal

This chapter presents our solution to the CoCoME assignment that is based on the Fractal component model. The solution involves (i) modeling architecture in Fractal ADL, (ii) specification of component behavior via behavior protocols, (iii) checking compatibility of components, (iv) verification of correspondence between component code and behavior specification, and (v) run-time monitoring of ...

متن کامل

Osa : an Open Component-based Architecture for Discrete-event Simulation

This paper describes work in progress to initiate the collaborative development of a new software platform for discrete-event simulation studies, the Open Simulation Architecture (OSA). OSA is primarily intended to be a federating platform for the simulation community: it is designed to favour the integration of new or existing contributions at every level of its architecture. The platform core...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Softw., Pract. Exper.

دوره 36  شماره 

صفحات  -

تاریخ انتشار 2006